
package com.joysuch.wwyt.datadump.biz.convertor;

import cn.zlg.common.datadump.annotation.DataDumpField;
import cn.zlg.common.datadump.convertor.FieldValueConvert;
import cn.zlg.common.datadump.service.JPABatchQueryPropertyValueService;
import com.joysuch.wwyt.core.entity.BaseTypeGroupItem;
import com.joysuch.wwyt.core.entity.dsl.QBaseTypeGroupItem;
import com.joysuch.wwyt.core.enums.UserRoleTypes;
import com.joysuch.wwyt.core.repository.BaseTypeGroupItemDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.List;

@Component
public class ExportBaseUserRoleConvertor implements FieldValueConvert<Long, String> {


    @Override
    public String convert(Object bean, Long value, DataDumpField dataField) {
        return value == null?null: UserRoleTypes.getRoleNameByIndex(value.intValue());
    }

}
